package com.Lgwd.testFile;

import com.Lgwd.utils.RandomUtils;
import com.Lgwd.utils.ResponseData;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.web.bind.annotation.GetMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RestController
public class TestData {


    /**
     * 链接测试
     *
     * @return success
     */
    @GetMapping("/LinkTest")
    public ResponseData linkTest() {

        ResponseData responseData=new ResponseData();
        responseData.setCode("000");
        log.info("项目启动存活连接成功");
        return responseData;
    }





    /**
     * 怪物类测试
     * @return MonsterTest
     */
    @GetMapping("/MonsterTest")
    public ResponseData monsterTest() {

        int i=5;
        int b= i+i/20;
        System.out.println(b);
        return ResponseData.defaultSuccess(b);
    }

    public static void main(String[] args) {


        for (int i = 0; i < 100; i++) {
            System.out.println(RandomUtils.getRangeStr(0,5));
        }

    }
}
